import React, { Component } from 'react'

class shopPage extends Component {
  state = {
    now: new Date().toLocaleString(),
  }
  componentDidMount() {
    this.timer = setInterval(() => {
      this.setState({now: new Date().toLocaleString()})
    }, 1000);
  }
  componentWillUnmount(){
    clearInterval(this.timer);
  }
  render() {
    return (
      <div className='jumbotron'>
        <h1>hi Shop</h1>
        <h3>{this.state.now}</h3>
        <hr />
      </div>
    )
  }
}
export default shopPage;

